// 引入需要的模块
import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from "vue-router";
// 下面使用了es6的对象增强写法，命名必须是routes
const routes = [
  {
    path: "/",
    component: () =>
      import("../components/openlayers/draw-feature/webgl-draw.vue"),
  },
  {
    path: "/gaode-arrow-animation",
    component: () =>
      import("../components/openlayers/line-animation/gaode-arrow-animation.vue"),
  },
  {
    path: "/common-line-animation",
    component: () =>
      import(
        "../components/openlayers/line-animation/common-line-animation.vue"
      ),
  },
  {
    path: "/common-line-icon-animation",
    component: () =>
      import(
        "../components/openlayers/line-animation/common-line-icon-animation.vue"
      ),
  },
  {
    path: "/webgl-line-animation",
    component: () =>
      import(
        "../components/openlayers/line-animation/webgl-line-animation.vue"
      ),
  },
  {
    path: "/epanet",
    component: () => import("../components/epanet/index.vue"),
  },
  {
    path: "/common-draw",
    component: () =>
      import("../components/openlayers/draw-feature/common-draw.vue"),
  },
  {
    path: "/webgl-draw",
    component: () =>
      import("../components/openlayers/draw-feature/webgl-draw.vue"),
  },
];

// 创建路由
const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

// 导出路由
export default router;
